package com.javapda.c328r.command.impl;

import org.apache.commons.lang.builder.ToStringBuilder;


/**
 * 
 * 
 */
public class SnapshotComediaCommand extends AbstractComediaCommand {
	private transient String toString;

	public String toString() {
		if (toString == null) {
			toString = new ToStringBuilder(this)
							.append("Snapshot Type", getSnapshotType())
							.append("Skip Frame Low Byte", getSkipFrameLowByte())
							.append("Skip Frame High Byte", getSkipFrameHighByte())
							.append("Skip Frame Size HEX", getSkipFrameSizeHex())
							.toString();
		}
		return toString;
	}
	private String getSkipFrameSizeHex() {
		StringBuilder sb = new StringBuilder();
		sb.append(Integer.toHexString(getSkipFrameHighByte()));
		sb.append(Integer.toHexString(getSkipFrameLowByte()));
		return sb.toString();
	}
	public SnapshotComediaCommand() {
		super(new SnapshotComediaCommandId());
	}
	public SnapshotComediaCommand(int[] snapshotInfo) {
		this();
		setSnapshotType(snapshotInfo[2]);
		setSkipFrameLowByte(snapshotInfo[3]);
		setSkipFrameHighByte(snapshotInfo[4]);
	}
	public void setSkipFrameHighByte(int highByte) {
		setParameter3(highByte);
	}
	public int getSkipFrameHighByte() {
		return getParameter3();
	}
	public void setSkipFrameLowByte(int lowByte) {
		setParameter2(lowByte);
	}
	public int getSkipFrameLowByte() {
		return getParameter2();
	}
	public void setSnapshotType(int snapshotType) {
		setParameter1(snapshotType);
	}
	public int getSnapshotType() {
		return getParameter1();
	}
	

}
